<html>
<title>VNC desktop</title>

<body id="applet-container">
</body>

<script>

    var request =
    {
        QueryString : function(val)
        {
            var uri = window.location.search;
            var re = new RegExp("" +val+ "=([^&?]*)", "ig");
            return ((uri.match(re))?(uri.match(re)[0].substr(val.length+1)):null);
        }
    }

    var host = request.QueryString("host");
    var port = request.QueryString("port");
    var password = request.QueryString("password");
    var container = document.getElementById("applet-container");

    var str = "<applet archive=\"tightvnc-jviewer.jar\" code=\"com.glavsoft.viewer.Viewer\" width=\"1\" height=\"1\">";
    str += "<param name=\"host\" value=\"" + host + "\" />";
    str += "<param name=\"port\" value=\"" + port + "\" />";
    str += "<param name=\"password\" value=\"" + password + "\" />";
    str += "<param name=\"OpenNewWindow\" value=\"yes\" />";
    str += "<param name=\"ShowControls\" value=\"yes\" />";
    str += "<param name=\"ViewOnly\" value=\"on\" />";
    str += "<param name=\"AllowClipboardTransfer\" value=\"yes\" />";
    str += "<param name=\"RemoteCharset\" value=\"standard\" />";
    str += "<param name=\"ShareDesktop\" value=\"yes\" />";
    str += "<param name=\"AllowCopyRect\" value=\"yes\" />";
    str += "<param name=\"Encoding\" value=\"Tight\" />";
    str += "<param name=\"CompressionLevel\" value=\"\" />";
    str += "<param name=\"JpegImageQuality\" value=\"\" />";
    str += "<param name=\"LocalPointer\" value=\"on\" />";
    str += "<param name=\"ConvertToASCII\" value=\"no\" />";
    str += "<param name=\"ColorDepth\" value=\"\" />";
    str += "<param name=\"ScalingFactor\" value=\"yes\" />";
    str += "<param name=\"sshHost\" value=\"\" />";
    str += "<param name=\"sshUser\" value=\"\" />";
    str += "<param name=\"sshPort\" value=\"\" />";
    str += "</applet>";

    container.innerHTML = str;

</script>
</html>